﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LedgerAdd.aspx.cs" Inherits="CURE.Harmful.LedgerAdd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <script type="text/javascript">

        $(document).ready(function () {
            var action = '<%=Action %>';
            if (action == "edit") {
                $("#FID").attr("readonly", "readonly");
            }
            var usertype = '<%=Usertype%>';
            if (usertype != "0") {
                $("#button_save").removeAttr("onclick");
            }
        });

        //解析F卡号
        function checkFid() {

            debugger;
            var l_FID = document.getElementById("FID").value;//F卡号
            l_FID = l_FID.replace(/(^\s*)|(\s*$)/g, ''); //去掉前后空格
            if (l_FID.length < 26) {
                alertMsg.error('不良橡胶F卡条码不足26位！');
                return false;
            }
            else {
                var l_DeviceNo = l_FID.substr(0, 2);//设备编号
                var l_Spec = l_FID.substr(2, 10);//规格
                var l_ProMonth = l_FID.substr(12, 1);//生产月份
                var l_ProDay = l_FID.substr(13, 1);//生产日期
                var l_OrderBatch = l_FID.substr(14, 1);//指令批次号
                var l_TrayNo = l_FID.substr(15, 3);//橡胶托盘编号
                var l_TrayBatch = l_FID.substr(18, 1);//橡胶批次
                var l_ExpireMonth = l_FID.substr(19, 1);//过期的月份
                var l_ExpireDay = l_FID.substr(20, 1);//过期天数
                var l_ProTime = l_FID.substr(21, 4);//生产时间
        
                document.getElementById("DeviceNo").value = l_DeviceNo;
                document.getElementById("Spec").value = l_Spec;
                document.getElementById("ProMonth").value = l_ProMonth;
                document.getElementById("ProDay").value = l_ProDay;
                document.getElementById("OrderBatch").value = l_OrderBatch;
                document.getElementById("TrayNo").value = l_TrayNo;
                document.getElementById("TrayBatch").value = l_TrayBatch;
                document.getElementById("ExpireMonth").value = l_ExpireMonth;
                document.getElementById("ExpireDay").value = l_ExpireDay;
                document.getElementById("ProTime").value = l_ProTime;

            }
        }

        
    </script>
    <title>无标题页</title>
    <style type="text/css">
        .icm_label {
            text-align: right;
        }

        .icm_txt {
            margin-bottom: 0px;
            left: 10px;        
        }

        .required {
            margin-bottom: 0px;
        }

        .sty_tr {
            height: 47px;
        }
    </style>
</head>
<body>
    <div class="pageContent">
        <form id="Form1" method="post" action="Handler/LedgerHandler.ashx" class="pageForm required-validate"
            onsubmit="return validateCallback(this,dialogAjaxDone)">
            <input type="hidden" name="id" value="<%=Id %>" id="id" />
            <input type="hidden" name="action" value="<%=Action %>" id="action" />
            <input type="hidden" name="page" value="<%=Page1 %>" id="page" />
            <div class="pageFormContent">
                <table class="table" layout="83" width="100%">
                    <%--<tr>
                        <td colspan="8">
                            <label style="text-align: center; width: 1000px; height: 30px; font-size: 26px; margin-top: 5px;">F卡登记</label>
                        </td>
                    </tr>--%>
                    <tr class="sty_tr">
                        <td>
                            <label class="icm_label" style="width: 80px; margin-left: 5px;">F卡号:</label></td>
                        <td colspan="3">
                            
                            <input id="FID" name="FID" class="required" type="text" onblur="checkFid();" style="width: 350px;" value="<%=FID %>" />
                        </td>
                    </tr>
                    <tr class="sty_tr">                      
                        <td>
                            <label class="icm_label" style="width: 80px; margin-left: 5px;">设备编号:</label>
                        </td>
                        <td>
                            <input id="DeviceNo" name="DeviceNo" class="icm_txt" type="text" readonly="readonly" maxlength="30" value="<%=DeviceNo %>" />
                        </td>
                        <td>
                            <label class="icm_label">规格:</label>
                        </td>
                        <td>
                            <input id="Spec" name="Spec" class="icm_txt" type="text" readonly="readonly" maxlength="30" value="<%=Spec %>" />
                        </td>
                        <td>
                            <label class="icm_label">生产月份:</label>
                        </td>
                        <td>
                            <input id="ProMonth" name="ProMonth" class="icm_txt" type="text" readonly="readonly" maxlength="30" value="<%=ProMonth %>" />
                        </td>
                        <td>
                            <label class="icm_label">生产日期:</label></td>
                        <td>
                            <input id="ProDay" name="ProDay" class="icm_txt" type="text" readonly="readonly" maxlength="30" value="<%=ProDay %>" />
                        </td>
                    </tr>
                    <tr class="sty_tr">                       
                        <td>
                            <label class="icm_label" style="width: 80px; margin-left: 5px;">指令批次号:</label>
                        </td>
                        <td>
                            <input id="OrderBatch" name="OrderBatch" class="icm_txt" type="text" readonly="readonly" maxlength="30" value="<%=OrderBatch %>" />
                        </td>
                        <td>
                            <label class="icm_label">橡胶托盘编号:</label>
                        </td>
                        <td>
                            <input id="TrayNo" name="TrayNo" class="icm_txt" type="text" readonly="readonly" maxlength="30" value="<%=TrayNo %>" />
                        </td>
                        <td>
                            <label class="icm_label">橡胶批次:</label>
                        </td>
                        <td>
                            <input id="TrayBatch" name="TrayBatch" class="icm_txt" type="text" readonly="readonly" maxlength="30" value="<%=TrayBatch %>" />
                        </td>
                        <td>
                            <label class="icm_label">过期的月份:</label></td>
                        <td>
                            <input id="ExpireMonth" name="ExpireMonth" class="icm_txt" type="text" readonly="readonly" maxlength="30" value="<%=ExpireMonth %>" />
                        </td>
                    </tr>
                    <tr class="sty_tr">                  
                        <td>
                            <label class="icm_label" style="width: 80px; margin-left: 5px;">过期天数:</label>
                        </td>
                        <td>
                            <input id="ExpireDay" name="ExpireDay" class="icm_txt" type="text" readonly="readonly" maxlength="30" value="<%=ExpireDay %>" />
                        </td>
                        <td>
                            <label class="icm_label">生产时间:</label>
                        </td>
                        <td>
                            <input id="ProTime" name="ProTime" class="icm_txt" type="text" readonly="readonly" maxlength="30" value="<%=ProTime %>" />
                        </td>
                        <td>
                            <label class="icm_label">重量:</label>
                        </td>
                        <td>
                            <input id="Weight" name="Weight" class="icm_txt" type="text" maxlength="30" value="<%=Weight %>" />
                        </td>
                    </tr>
                    <tr class="sty_tr">
                        <td>
                            <label class="icm_label" style="width: 80px; margin-left: 5px;">原因:</label></td>
                        <td colspan="7">
                            <input id="Reason" name="Reason" class="icm_txt" type="text" style="width: 990px;" value="<%=Reason %>" />
                        </td>
                    </tr>
                    <tr class="sty_tr">
                        <td>
                            <label class="icm_label" style="width: 80px; margin-left: 5px;">班别:</label>
                        </td>
                        <td>
                            <input id="FClass" name="FClass" class="icm_txt" type="text" maxlength="30" value="<%=FClass %>" />
                        </td>
                        <td>
                            <label class="icm_label">机台:</label>
                        </td>
                        <td>
                            <input id="Machine" name="Machine" class="icm_txt" type="text" maxlength="30" value="<%=Machine %>" />
                        </td>
                        <td>
                            <label class="icm_label">部材名称:</label>
                        </td>
                        <td>
                            <input id="Material" name="Material" class="icm_txt" type="text" maxlength="30" value="<%=Material %>" />
                        </td>
                        <td>
                            <label class="icm_label">胶片型号:</label></td>
                        <td>
                            <input id="FilmModel" name="FilmModel" class="icm_txt" type="text" style="" maxlength="30" value="<%=FilmModel %>" />
                        </td>
                    </tr>
                    <tr class="sty_tr">
                        <td>
                            <label class="icm_label" style="width: 80px; margin-left: 5px;">油型号:</label>
                        </td>
                        <td>
                            <input id="OilModel" name="OilModel" class="icm_txt" type="text" maxlength="30" value="<%=OilModel %>" />
                        </td>
                        <td>
                            <label class="icm_label">实际保留数量:</label>
                        </td>
                        <td>
                            <input id="ActualNum" name="ActualNum" class="icm_txt" type="text" maxlength="30" value="<%=ActualNum %>" />
                        </td>
                        <td>
                            <label class="icm_label">实际保留BT数:</label>
                        </td>
                        <td>
                            <input id="BTNo" name="BTNo" class="icm_txt" type="text" maxlength="30" value="<%=BTNo %>" />
                        </td>
                        <td>
                            <label class="icm_label">lot report报警BT数:</label></td>
                        <td>
                            <input id="BJBTNO" name="BJBTNO" class="icm_txt" type="text" style="" maxlength="30" value="<%=BJBTNO %>" />
                        </td>
                    </tr>
                    <tr class="sty_tr">
                        <td>
                            <label class="icm_label" style="width: 80px; margin-left: 5px;">确认者:</label>
                        </td>
                        <td>
                            <input id="OkMan" name="OkMan" class="icm_txt" type="text" maxlength="30" value="<%=OkMan %>" />
                        </td>
                        <td>
                            <label class="icm_label">保留置场:</label>
                        </td>
                        <td>
                            <input id="Field" name="Field" class="icm_txt" type="text" maxlength="30" value="<%=Field %>" />
                        </td>
                        <td>
                            <label class="icm_label">制造确认者:</label>
                        </td>
                        <td>
                            <input id="MakeMan" name="MakeMan" class="icm_txt" type="text" maxlength="30" value="<%=MakeMan %>" />
                        </td>
                        <td>
                            <label class="icm_label">技术确认者:</label>
                        </td>
                        <td>
                            <input id="Skiller" name="Skiller" class="icm_txt" type="text" style="" maxlength="30" value="<%=Skiller %>" />
                        </td>
                    </tr>
                    <tr class="sty_tr">
                        <td>
                            <label class="icm_label" style="width: 80px; margin-left: 5px;">处理日期:</label>
                        </td>
                        <td>
                            <input id="HandlerTime" name="HandlerTime" class="date" datefmt="yyyy-MM-dd" readonly="readonly" value="<%=HandlerTime %>" />
                        </td>
                        <td>
                            <label class="icm_label">班别/直:</label>
                        </td>
                        <td>
                            <input id="FClass2" name="FClass2" class="icm_txt" type="text" maxlength="30" value="<%=FClass2 %>" />
                        </td>
                        <td>
                            <label class="icm_label">处理机台:</label>
                        </td>
                        <td>
                            <input id="Machine2" name="Machine2" class="icm_txt" type="text" maxlength="30" value="<%=Machine2 %>" />
                        </td>
                        <td>
                            <label class="icm_label">混入主体型号:</label></td>
                        <td>
                            <input id="SubModel" name="SubModel" class="icm_txt" type="text" style="" maxlength="30" value="<%=SubModel %>" />
                        </td>
                    </tr>
                    <tr class="sty_tr">
                        <td>
                            <label class="icm_label" style="width: 80px; margin-left: 5px;">混入主体BT数:</label>
                        </td>
                        <td>
                            <input id="SubBTNum" name="SubBTNum" class="icm_txt" type="text" maxlength="30" value="<%=SubBTNum %>" />
                        </td>
                        <td>
                            <label class="icm_label">混入量:</label>
                        </td>
                        <td>
                            <input id="Interfuse" name="Interfuse" class="icm_txt" type="text" maxlength="30" value="<%=Interfuse %>" />
                        </td>
                        <td>
                            <label class="icm_label">有无残留:</label>
                        </td>
                        <td>
                            <input id="Residual" name="Residual" class="icm_txt" type="text" maxlength="30" value="<%=Residual %>" />
                        </td>
                    </tr>
                    <tr class="sty_tr">
                        <td>
                            <label class="icm_label" style="width: 80px; margin-left: 5px;">备注:</label></td>
                        <td colspan="7">
                            <input id="Remarks" name="Remarks" class="icm_txt" type="text" style="width: 990px;" value="<%=Remarks %>" />
                        </td>
                    </tr>
                    <tr class="sty_tr">
                        <td colspan="8">
                            <button id="button_save" type="submit" style="width: 50px; height: 25px; margin-left: 960px;" onclick="return confirm('一经保存,无法更改,确定保存吗？')">保存</button>
                            <button type="reset" style="width: 50px; height: 25px; margin-left: 30px;" class="close">取消</button>
                        </td>
                    </tr>
                </table>
            </div>
            
        </form>
    </div>
</body>
</html>
